﻿<Window x:Class="Refugees.Views.Windows.UserEdit"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Refugees.Views.Windows"
        mc:Ignorable="d"
        Title="Пользователь" Height="450" Width="800">
    <Window.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="FontSize" Value="20"/>
            <Setter Property="FontStyle" Value="Italic"/>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF819B3D"/>
                <GradientStop Color="#FFA3DAD8" Offset="0.626"/>
            </LinearGradientBrush>
        </Grid.Background>

        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="4*"/>

            <RowDefinition/>
        </Grid.RowDefinitions>

        <Label Content="Kind Hend" 
                   Foreground="Black"
                   FontSize="36"
                   FontStyle="Italic" 
               VerticalAlignment="Center" HorizontalAlignment="Center"
                   FontWeight="Bold" FontFamily="Segoe Script"/>

        <Button Content="Назад" Click="BackClick" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="15" Style="{DynamicResource Vhod}"/>

        <Grid Grid.Row="1">

            <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch">
                    <GroupBox  Header="Телефон">
                        <TextBox Style="{DynamicResource Login}" Text="{Binding Phone}" />
                    </GroupBox>

                    <GroupBox Header="Почта">
                        <TextBox  Style="{DynamicResource Login}" Text="{Binding Email}" />
                    </GroupBox>
                    <GroupBox  Header="Организация">
                        <ComboBox SelectedItem="{Binding Organization}" DisplayMemberPath="Name" Name="Organization" />
                    </GroupBox>

                    <GroupBox Header="Роль" Grid.Row="1">
                        <ComboBox SelectedItem="{Binding Role}" DisplayMemberPath="name" Name="Roles" />
                    </GroupBox>
                </StackPanel>
            </ScrollViewer>

        </Grid>

        <Button Grid.Row="2"
                Grid.Column="0"
                Content="Сохранить"
                Click="SaveClick"
                VerticalAlignment="Center"  HorizontalAlignment="Center" Style="{DynamicResource Vhod}"/>
    </Grid>
</Window>
